?
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>6_3_2-1-智能合并</title>
</head>

<body>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <div id="Application">
    <my-com></my-com>
  </div>
  <script>
    //定义一个组件，名为App
    const App = Vue.createApp({});
    const myMixin = {
      data() {
        return {
          a: "a",
          b: "b",
          c: "c",
        };
      },
    };
    const com = {
      mixins: [myMixin],
      data() {
        return {
          d: "d",
        };
      },
      template: `<div>{{a}}{{d}}</div>`,
      //组件杯创建后会调用，用来测试混入的数据情况
      created() {
        //a,b,c,d都存在
        console.log(this.$data);
      },
    };
    App.component("my-com", com);
    App.mount("#Application"); //将Vue组件绑定到页面上id为Application的元素上。
  </script>
</body>

</html>